<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>


    <meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Simple Editor &mdash; Basic Buttons</title>

<style type="text/css">
/*margin and padding on body element
  can introduce errors in determining
  element position and are not recommended;
  we turn them off as a foundation for YUI
  CSS treatments. */
body {
	margin:0;
	padding:0;
}
</style>

<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.8.0r4/build/fonts/fonts-min.css" />
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.8.0r4/build/editor/assets/skins/sam/simpleeditor.css" />
<script type="text/javascript" src="http://yui.yahooapis.com/2.8.0r4/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.8.0r4/build/element/element-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.8.0r4/build/container/container_core-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.8.0r4/build/editor/simpleeditor-min.js"></script>
<script src="safari-select-patch.js"></script>
<!--there is no custom header content for this example-->

</head>

<body class="yui-skin-sam">


<h1>Simple Editor &mdash; Basic Buttons</h1>

<div class="exampleIntro">
	<p>This example demonstrates how to use the SimpleEditor Control with Basic Buttons.</p>
			
</div>

<!--BEGIN SOURCE CODE FOR EXAMPLE =============================== -->

<form method="post" action="#" id="form1">
<textarea id="editor" name="editor" rows="20" cols="75">
This is some more test text.<br>This is some more test text.<br>This is some more test text.<br>This is some more test text.<br>This is some more test text.<br>This is some more test text.<br>This is some more test text.<br>
</textarea>
</form>

<script>

(function() {
    var Dom = YAHOO.util.Dom,
        Event = YAHOO.util.Event;
    
    var myConfig = {
        height: '300px',
        width: '600px',
        dompath: true,
        focusAtStart: true
    };

    YAHOO.log('Create the Editor..', 'info', 'example');
    var myEditor = new YAHOO.widget.SimpleEditor('editor', myConfig);
    myEditor.render();

})();
</script>


<!--END SOURCE CODE FOR EXAMPLE =============================== -->


<!--MyBlogLog instrumentation-->
<script type="text/javascript" src="http://track2.mybloglog.com/js/jsserv.php?mblID=2007020704011645"></script>

</body>
</html>

<!-- SpaceID=0 robot -->

<!-- VER-765 -->
<!-- BUGREPORTER_START -->
<span id='bugreporter_container'>
<!-- AUTO INCLUDED CODE - MODIFY AT THE PATH BELOW -->
<!-- INCLUDE ../../../../../../shared/html/interface.html php -->
<div id='bugreporter_footer' style='padding: 4px 10px; background-color: lightyellow; float:left; font-size: 11px; font-family: sans-serif; font-weight: normal; width: 98%; color: black; z-index: 1000;'>

<div id='bugreporter_report' style='float: left; text-align: left; font-size: 11px; font-family: sans-serif; width: 50%; color: black; background-color: lightyellow;'>
    <span id='bugreporter_yahoos' style='color: purple; font-size: 14px; font-weight: bold; background-color:lightyellow;'>Yahoos:</span> Problem with this <span id='bugreporter_product_name'>YDN</span> page? <span id='bugreporter_prompt'><a href='#' style='{color: blue; font-size: 11px; font-family: sans-serif; text-decoration: underline; background-color: lightyellow;} :visited {color: purple} :hover {text-decoration: underline} :active{color: red}' target='_blank' onclick='bugreporter_submitBug(); return false;'>File a bug</a></span><span id='bugreporter_badad' style='display: none'> or <span style='{color: blue; font-size: 11px; font-family: sans-serif; text-decoration: underline; background-color: lightyellow;} :visited {color: purple} :hover {text-decoration: underline} :active{color: red}'><a href='#' target='_blank' onclick='bugreporter_submitBadAd(); return false;' style='{color: blue; font-size: 11px; font-family: sans-serif; text-decoration: underline; background-color: lightyellow;} :visited {color: purple} :hover {text-decoration: underline} :active{color: red}'>report a bad ad</a></span></span>!
</div>
<div id='bugreporter_dateline' style='float: right; color: gray; width: 50%; text-align: right; margin-top: 3px; font-family: sans-serif; font-size: 11px; background-color: lightyellow;'>
   p6.ydn.sp1.yahoo.com / 2010-03-29 12:52:30 / <a href='#' style='{color: blue; font-size: 11px; font-family: sans-serif; text-decoration: underline; background-color: lightyellow;} :visited {color: purple} :hover {text-decoration: underline} :active{color: red}' id='bugreporter_oldbugslink' title='View bugs filed against this page'>bugs</a> / <span id='bugreporter_dyc'></span> <a href='http://bugreporter.corp.yahoo.com' title='About the Yahoo! Bug Reporter' style='{color: blue; font-size: 11px; font-family: sans-serif; text-decoration: underline; background-color: lightyellow;} :visited {color: purple} :hover {text-decoration: underline} :active{color: red}' >about</a> / <a href='#bugreporter_hide' style='{color: blue; font-size: 11px; font-family: sans-serif; text-decoration: underline; background-color: lightyellow;} :visited {color: purple} :hover {text-decoration: underline} :active{color: red}' onclick='bugreporter_hide()'>hide</a> / <span id='bugreporter_upsell' style='font-weight: bold;'></span>
</div>

<div id='bugreporter_source' style='display: none'>
      <form id='bugreporter_form' method='post' action='http://bugreporter.corp.yahoo.com/new' TARGET='_blank'>
        <input type='hidden' name='bugurl'      id='bugreporter_bugurl'         value='http://bug.corp.yahoo.com/enter_bug.cgi?action=edit&keywords=ybugreporter&bug_file_loc=http%3A%2F%2Fdeveloper.yahoo.com&product=YDN&component=Web+site&bugtype=Defect&comment=%0D%0A%0D%0A%0D%0A--%0D%0AFiled+via+Y%21+Bug+Reporter%3A+http%3A%2F%2Ftwiki.corp.yahoo.com%2Fview%2FMain%2FYahooBugReporter%0D%0APage+was+served209.131' /> 
        <input type='hidden' name='extension'   id='bugreporter_extension'      value='0' /> 
        <input type='hidden' name='pkgname'     id='bugreporter_package'        value='yphp_bugreporter' /> 
        <input type='hidden' name='pkgversion'  id='bugreporter_version'        value='2.5.0' /> 
        <input type='hidden' name='screengrab'  id='bugreporter_screencapture'  value='' /> 
        <input type='hidden' name='rmids'       id='bugreporter_rightmediaids'  value='' /> 
        <input type='hidden' name='hostname'    id='bugreporter_hostname'       value='p6.ydn.sp1.yahoo.com' />
        <input type='hidden' name='product'     id='bugreporter_product'        value='YDN' />
        <input type='hidden' name='productname' id='bugreporter_productname'    value='YDN' />
        <input type='hidden' name='component'   id='bugreporter_component'      value='Web site' />
        <input type='hidden' name='tickettype'  id='bugreporter_tickettype'     value='Defect' />
        <input type='hidden' name='obsversion'  id='bugreporter_obsversion'     value='' />
        <textarea id='bugreporter_sourcetext' name='source' readonly='' rows='1' cols='1'></textarea>
     </form> 
</div>
<canvas id='bugreporter_buffer_canvas' style='display: none'></canvas>
</div>
<!-- END INCLUDE -->
<script type='text/javascript'>
<!-- INCLUDE ../../../../../../shared/html/interface.js php -->

   var BUGREPORTER_SPACEID = 0;
   var BUGREPORTER_ADPROPERTY;
   var BUGREPORTER_ADS = [];
   var BUGREPORTER_NOW = new Date();

// Flash Player Version Detection - Rev 1.5
// Detect Client Browser type
// Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved.

function bugreporter_ControlVersion()
{
	var version;
	var axo;
	var e;

	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";

			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";

			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = "";
		}
	}
	
	return version;
}

// JavaScript helper required to detect Flash Player PlugIn version information
function bugreporter_GetSwfVer(){


	var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
	var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
	var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

	// NS/Opera version >= 3 check for Flash plugin in plugin array
	var flashVer = "";
	var tempArrayMinor;
	
	if (navigator.plugins !== null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;			
			var descArray = flashDescription.split(" ");
			var tempArrayMajor = descArray[2].split(".");
			var versionMajor = tempArrayMajor[0];
			var versionMinor = tempArrayMajor[1];
			if ( descArray[3] !== "" ) {
				tempArrayMinor = descArray[3].split("r");
			} else {
				tempArrayMinor = descArray[4].split("r");
			}
			var versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
			flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) { flashVer = 4; }
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) { flashVer = 3; }
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) { flashVer = 2; }
	else if ( isIE && isWin && !isOpera ) {
		flashVer = bugreporter_ControlVersion();
	}	
	return flashVer;
}

   function bugreporter_hide()
   {
       var sourcediv = document.getElementById('bugreporter_footer');
       sourcediv.style.display = 'none';
   }


   function bugreporter_leadingZero(num)
   {
      if (num < 10)
      {
          return '0' + '' + num;
      }
      return num;
   }
      
   function bugreporter_getPageURL()
   {
   		var url = document.location.href;
   		url = url.replace(/;?_yl[a-z]\=[a-z0-9\.\_]+\-*\/?/ig,'');
   		return url;
   }

  function bugreporter_hasExtension()
  {
      var form = document.getElementById('bugreporter_extension');

      if (form && form.value != '0')
      {
          return true;
      }

      return false;
   }

   function bugreporter_loadSource()
   {
      var source = document.getElementById('bugreporter_sourcetext');
      if (!source.value)
      {
          var de = document.documentElement; 
          source.value = '<' + de.nodeName.toLowerCase() + '>' + de.innerHTML + '</' + de.nodeName.toLowerCase() + '>';
          
          var footerStart = source.value.indexOf('<!-- BUG' + 'REPORTER_START -->');
          var footerEnd = source.value.indexOf('<!-- BUG' + 'REPORTER_END -->');
          
          if (footerStart >= 0 && footerEnd >= 0)
          {
          	source.value = source.value.substr(0, footerStart) + source.value.substr(footerEnd + 24);
          }
      }      
   }


   function bugreporter_createBugURL()
   {
        var location = bugreporter_getPageURL();
        
		var bugURL = "http://bug.corp.yahoo.com/enter_bug.cgi?action=edit&keywords=ybugreporter&bug_file_loc=" + escape(location);

		var hostname = window.location.host.replace(/yahoo\.com/, '');
		var machinename = '';
	
		var now = BUGREPORTER_NOW;

		var date = now.getFullYear() + '-' + bugreporter_leadingZero(now.getMonth() + 1) + '-' + bugreporter_leadingZero(now.getDate()) + ' ' + now.getHours() + ':' + bugreporter_leadingZero(now.getMinutes()) + ':' + bugreporter_leadingZero(now.getSeconds());
	
		var servertime;
	
		var pageDetails = document.documentElement.innerHTML.match(/<!-- ([a-z0-9\.]*) ([a-z\/]*) ([a-z]{2,3} [a-z]{3}  ?[0-9]{1,2} [0-9:]{5,8} [a-z]{2,4} [0-9]{4}) -->/i);
	
		if (pageDetails)
		{
			hostname = pageDetails[1];
			machinename = hostname;
			servertime = pageDetails[3];
		}
				
		var prod = document.getElementById('bugreporter_product');	
		if (prod && prod.value)
		{
		   bugURL += '&product=' + escape(prod.value);
		}

		var comp = document.getElementById('bugreporter_component');
		if (comp && comp.value)
		{
		   bugURL += '&component=' + escape(comp.value);
		}

		var obsversion = document.getElementById('bugreporter_obsversion');
		if (obsversion && obsversion.value)
		{
		   bugURL += '&version=' + escape(obsversion.value);
		}

		var tickettype = document.getElementById('bugreporter_tickettype');
		if (tickettype && tickettype.value)
		{
		   bugURL += '&bugtype=' + escape(tickettype.value);
		}
		
		var extensionVersion = '';
		
		var ext = document.getElementById('bugreporter_extension');

      	if (ext && ext.value != '0')
      	{
      		extensionVersion = ext.value;
      	}
      	
      	var version = ' ' + extensionVersion + 'p';
      	
      	var pkgVersion = document.getElementById('bugreporter_version').value;
      	var pkgName = document.getElementById('bugreporter_package').value;
		
		if (pkgVersion)
		{
			version = ' ' + pkgVersion + 'p';
		}
		
		bugURL += '&comment=%0D%0A%0D%0A%0D%0A--%0D%0A' + escape("Filed via Y! Bug Reporter" + version + ": http://bugreporter.corp.yahoo.com") + '%0D%0APage+was+served';
		
		if (machinename)
		{
		   bugURL += "+by+" + machinename;
		}
		
		bugURL += '+on+' + escape(servertime ? servertime : date) + '+to+a+' + escape(navigator.userAgent) + '+browser';
		
		var flash = bugreporter_GetSwfVer();
		
		if (flash)
		{
			bugURL += '+with+Flash+' + escape(flash);
		}

		var userreg = new RegExp('Wel' + 'come,(.*)Sign Out' , '');

		var username = userreg.exec(document.documentElement.innerHTML);
		if (username)
		{
			username = username[1].replace(/<[^>]+>/g, '');
			username = username.replace(/\s+/g, '');
			username = username.replace(/\[/g, '');

			bugURL += '%0D%0ALogged+in+as:+' + escape(username);
		}
		
		if (BUGREPORTER_SPACEID)
		{
			bugURL += '%0D%0AAds+requested+for+' + BUGREPORTER_ADPROPERTY + '+(' + BUGREPORTER_SPACEID + '):';
			
			for (var ad in BUGREPORTER_ADS)
			{
				bugURL += "%0D%0A+++" + BUGREPORTER_ADS[ad].position + ":+" + BUGREPORTER_ADS[ad].matchid + escape(', ') + BUGREPORTER_ADS[ad].adid;
			}
		}
		
		if (document.getElementById('bugreporter_rightmediaids') && document.getElementById('bugreporter_rightmediaids').value)
		{
			bugURL += "%0D%0A+++Right+Media:+";
			
			var rmads = document.getElementById('bugreporter_rightmediaids').value.split(",");
			
			for (var ad in rmads)
			{
				bugURL += "%0D%0A++++" + escape("http://ads.bluelithium.com/decode-click,") + rmads[ad];
			}
		}
				
		document.getElementById('bugreporter_bugurl').value = bugURL;
		
		return bugURL;
   }

   function bugreporter_handleScreenCapture()
   {
       var form = document.getElementById('bugreporter_form');
       form.submit();
   }

   function bugreporter_takeCapture()
   {
	try // IE method
	{
		var obj = new ActiveXObject("YBugReporter.Injector.1");
		if ( obj )
		{
			obj.captureScreen( document );
			return true;
		}
	}
	catch(e)
	{
			// Firefox method
			
        	top.bugreporter_screencapture_params = {};
       		top.bugreporter_screencapture_params.receivingElement = 'bugreporter_screencapture';

       		var scEvent = document.createEvent('Events');
       		if (scEvent)
       		{
           		scEvent.initEvent('BugReporterScreenCapture', true, true);
           		top.dispatchEvent(scEvent);
       		}
	}
   }

   function bugreporter_submitBadAd()
   {
   
       bugreporter_loadSource();
       
       var form = document.getElementById('bugreporter_form'); 
       document.getElementById('bugreporter_product').value = 'ad technologies';
       document.getElementById('bugreporter_component').value = 'Ad Problems';

       bugreporter_createBugURL();

       if (bugreporter_hasExtension())
       {
	       bugreporter_takeCapture();

           /* cheap hack. Can't seem to receive events from chrome */
           window.setTimeout(bugreporter_handleScreenCapture, 500);
       }
       else
       {
           form.submit();
       }
   }


   function bugreporter_submitBug()
   {

       var bugURL = bugreporter_createBugURL();
	   var capture = (bugreporter_hasExtension() ? ' and a screenshot' : '');
       var form = document.getElementById('bugreporter_form'); 

       if (confirm('Would you like to automatically include the HTML source' + capture + ' of this page? (This is often helpful in reproducing the problem.) Click cancel to proceed without it.')) 
       { 
           var form = document.getElementById('bugreporter_form'); 

           bugreporter_loadSource();

           if (bugreporter_hasExtension())
           {
               bugreporter_takeCapture();

               /* cheap hack. Can't seem to receive events from chrome */
               window.setTimeout(bugreporter_handleScreenCapture, 500);
           }
           else
           {
               form.submit();
           }
         }
       else
       {
           form.submit();
       }
   }


function bugreporter_parseAds()
{

    var source = document.documentElement.innerHTML + '';
   
	var adsre = new RegExp('\/D=([^\/]+)\/S=([0-9]+):', '');
	var ads;
	ads = adsre.exec(source);
	
	if (ads !== null)
	{
		BUGREPORTER_ADPROPERTY = ads[1];
		BUGREPORTER_SPACEID = ads[2];
	}

//	alert(BUGREPORTER_ADPROPERTY + " " + BUGREPORTER_SPACEID);

	adsre = new RegExp('=\'&U=([^\']+)', 'g');

	var adcount = 0;
	var match;
	
	while ((ads = adsre.exec(source)) !== null)
	{
		var adstr = unescape(ads[1]);
//		alert(adstr);

		match = adstr.match(/C=([^\/]+)/);

		if (match)
		{		
			BUGREPORTER_ADS[adcount] = [];
			BUGREPORTER_ADS[adcount].matchid = match[1];

			match = adstr.match(/B=([^\/]+)/);

			if (match)
			{
				BUGREPORTER_ADS[adcount].adid = match[1];
			}
		
			match = adstr.match(/D=([^\/]+)/);

			if (match)
			{
				BUGREPORTER_ADS[adcount].position = match[1];
			}
			adcount++;
		}
	}
}

	bugreporter_parseAds();

	if (BUGREPORTER_SPACEID)
	{	
	   var dyc = document.getElementById('bugreporter_dyc');
	   dyc.innerHTML = ' <a style="{color: blue; font-size: 11px; font-family: sans-serif; text-decoration: underline; background-color: lightyellow;} :visited {color: purple} :hover {text-decoration: underline} :active{color: red}" title="View usage statistics about this page (' + BUGREPORTER_SPACEID + ')" href="http://data.yahoo.com/main/property_details.asp?spaceid=' + BUGREPORTER_SPACEID + '">DYC</a> /';
	   
	   if (BUGREPORTER_ADS.length > 0)
	   {
	   	  var badad = document.getElementById('bugreporter_badad');
	      badad.style.display = 'inline';
	   }
	}
	
	// avoid javascript onclicks when we can
	var oldbugs = document.getElementById('bugreporter_oldbugslink');
    oldbugs.href = 'http://bug.corp.yahoo.com/buglist.cgi?query_format=advanced&bug_status=NEW&bug_status=ACCEPTED&bug_status=REOPENED&field0-0-0=bug_file_loc&type0-0-0=equals&value0-0-0=' + escape(bugreporter_getPageURL());
    
    var foot = document.getElementById('bugreporter_footer');
    
	if (foot.offsetTop < 50)
	{
   		foot.style.position = 'fixed';
   		foot.style.bottom = '0px';
	}

<!-- END INCLUDE -->
</script>
<script type='text/javascript'>

      if (navigator.userAgent.indexOf("Firefox")!=-1)
      {
          // give the extension time to fill in the version number
          window.setTimeout('bugreporter_upsell()', 2000);
      }

   function bugreporter_upsell()
   {
       var version = document.getElementById('bugreporter_extension');
       if (version.value == 0)
       {
           var upsell = document.getElementById('bugreporter_upsell');
           upsell.innerHTML = "<a href='http://twiki.corp.yahoo.com/view/Main/YahooBugReporterDownload?template=viewprint'>Get the add-on!</a>";
       }
   }
</script>
</span>
<!-- BUGREPORTER_END -->
<!-- p6.ydn.sp1.yahoo.com uncompressed Mon Mar 29 12:52:30 PDT 2010 -->
